import request from "@/utils/request";

/**
 * 用户登录
 * @param user
 * @returns {AxiosPromise}
 */
export function login(user) {
    return request({
        url: "login",
        method: "POST",
        data: user
    })
}

/**
 * 获取用户信息
 */
export function userDetailInfo() {
    return request({
        url: "user/info",
        method: "GET",
    })
}

/**
 * 登出
 * @returns {AxiosPromise}
 */
export function logout() {
    return request({
        url: "logout",
        method: "POST"

    })
}